<?php
include_once 'all.class.php';
if (empty($_GET["new"]))
{
	$page=0;	
}else {
	$page=$_GET["new"];
}



$iipp=GetIP();
echo $iipp;
mysql_connect("$db_host","$db_user","$db_password");
mysql_select_db("$db_name");
$key = "anshijie";//加密秘钥
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<head>';
bdtj();//百度统计
echo '
<link href="sy.css" rel="stylesheet" type="text/css" />
<title>防爆菊中心</title>
</head>

<body>';

tongzhi();
echo '
	<tr>
		
  <td>请输入提取提取id</td>
  <td>
      <form method="post" action="tiqu.php"> 
		<input type="text" name="tiquid" />
			<input type="submit" />
			</form>

</td>
<td>请输入关键词</td>
	<td>
	
		<form method="get" action="search.php"> 
		<input type="text" name="search" />
			<input type="submit" />
			</form>
	</td>
    <td class="tijiao"> <a href="gx.php">点我提交网盘地址</td>
  </tr>
</table>
<table width="960" border="1" align="center" cellspacing="2">
  <tr>
    <td width="50">ID</td>
    <td width="540">文件名</td>
    <td width="100">网盘地址</td>
    <td width="100">一键下载</td>
    <td width="70">解压密码</td>
  </tr>

  		';
		$pagetemp=$page*15;
		$sql= "select * from url2 order by id DESC limit $pagetemp,15";
		mysql_query("set names utf8");
		$result = mysql_query($sql);
 		while ($row = mysql_fetch_array($result, MYSQL_NUM)) 
 		{
 			echo "<tr>";
 		
       			 printf ("<td> %s</td>", $row[0]);
       		echo '<td><div style="width:540px; overflow:hidden;">';
       			 printf ("%s</div></td>", $row[1]) ;
       			 
    			$urltemp=str_ireplace("http://", "", $row[2]);
				$url='http://'.$urltemp;
       			 echo '<td><div style="width:80px; height:20px; overflow:hidden;"><a href="';
       				echo "http://www.baidu.com";
       				echo '">暂不开放</div></td>';
       			echo '<td>
       				<form method="post" action="download.php"> 
<input type="hidden" name="download" value="';
       			$encrypt = passport_encrypt($row[2],$key); 
       			echo $encrypt;
      			echo '"> 
<input type="submit" name="submit" value="点我一键下载"> 
</form> 
       			</td>';
      			echo '<td><div style="width:200px; height:20px; overflow:hidden;">';
       			 printf ("%s</div></td>",  $row[3]);
       			 
        
        	echo "</tr>";
    }
		
		mysql_close();
		echo ' <tr>
    <td width=%10 nowrap></td>
     <td ></td><td ></td><td ></td>';
	echo "<td width=%20 nowrap><a href=";
	echo "index.php?new=";
	echo ++$page;
	echo ">下一页</a></td>
  </tr>";
  		
	echo '
		</table>';
	
	

	
	echo '</body>
				</html>';
?>